/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Nas
 */
@Entity
@Table(name = "EVALUACION_SV")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "EvaluacionSv.findAll", query = "SELECT e FROM EvaluacionSv e"),
    @NamedQuery(name = "EvaluacionSv.findByIdEvaluacionSv", query = "SELECT e FROM EvaluacionSv e WHERE e.idEvaluacionSv = :idEvaluacionSv"),
    @NamedQuery(name = "EvaluacionSv.findByValFrecCardi", query = "SELECT e FROM EvaluacionSv e WHERE e.valFrecCardi = :valFrecCardi"),
    @NamedQuery(name = "EvaluacionSv.findByValFrecRespi", query = "SELECT e FROM EvaluacionSv e WHERE e.valFrecRespi = :valFrecRespi"),
    @NamedQuery(name = "EvaluacionSv.findByTempCorporal", query = "SELECT e FROM EvaluacionSv e WHERE e.tempCorporal = :tempCorporal"),
    @NamedQuery(name = "EvaluacionSv.findByPresArterial", query = "SELECT e FROM EvaluacionSv e WHERE e.presArterial = :presArterial")})
public class EvaluacionSv implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_EVALUACION_SV")
    private Integer idEvaluacionSv;
    @Column(name = "VAL_FREC_CARDI")
    private Integer valFrecCardi;
    @Column(name = "VAL_FREC_RESPI")
    private Integer valFrecRespi;
    @Column(name = "TEMP_CORPORAL")
    private String tempCorporal;
    @Column(name = "PRES_ARTERIAL")
    private String presArterial;
    @JoinColumn(name = "ID_SIGNO_VITAL", referencedColumnName = "ID_SIGNO_VITAL")
    @ManyToOne
    private SignoVital idSignoVital;
    @JoinColumn(name = "ID_EVALU_MEDICA", referencedColumnName = "ID_EVALU_MEDICA")
    @ManyToOne(optional = false)
    private HistoriaClinica idEvaluMedica;

    public EvaluacionSv() {
    }

    public EvaluacionSv(Integer idEvaluacionSv) {
        this.idEvaluacionSv = idEvaluacionSv;
    }

    public Integer getIdEvaluacionSv() {
        return idEvaluacionSv;
    }

    public void setIdEvaluacionSv(Integer idEvaluacionSv) {
        this.idEvaluacionSv = idEvaluacionSv;
    }

    public Integer getValFrecCardi() {
        return valFrecCardi;
    }

    public void setValFrecCardi(Integer valFrecCardi) {
        this.valFrecCardi = valFrecCardi;
    }

    public Integer getValFrecRespi() {
        return valFrecRespi;
    }

    public void setValFrecRespi(Integer valFrecRespi) {
        this.valFrecRespi = valFrecRespi;
    }

    public String getTempCorporal() {
        return tempCorporal;
    }

    public void setTempCorporal(String tempCorporal) {
        this.tempCorporal = tempCorporal;
    }

    public String getPresArterial() {
        return presArterial;
    }

    public void setPresArterial(String presArterial) {
        this.presArterial = presArterial;
    }

    public SignoVital getIdSignoVital() {
        return idSignoVital;
    }

    public void setIdSignoVital(SignoVital idSignoVital) {
        this.idSignoVital = idSignoVital;
    }

    public HistoriaClinica getIdEvaluMedica() {
        return idEvaluMedica;
    }

    public void setIdEvaluMedica(HistoriaClinica idEvaluMedica) {
        this.idEvaluMedica = idEvaluMedica;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEvaluacionSv != null ? idEvaluacionSv.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EvaluacionSv)) {
            return false;
        }
        EvaluacionSv other = (EvaluacionSv) object;
        if ((this.idEvaluacionSv == null && other.idEvaluacionSv != null) || (this.idEvaluacionSv != null && !this.idEvaluacionSv.equals(other.idEvaluacionSv))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.EvaluacionSv[ idEvaluacionSv=" + idEvaluacionSv + " ]";
    }
    
}
